﻿using DevComponents.DotNetBar;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WorkStation.Common
{
    public class SystemInfo
    {
        public static void ShowToastInfo(Control parentControl, string info, bool isWarn, int toastDuration = 3)
        {
            ToastNotification.ToastFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            ToastNotification.ToastBackColor = Color.DimGray;
            ToastNotification.Show(parentControl,
                                   info,
                                   null,
                                   toastDuration * 1000,
                                   isWarn ? eToastGlowColor.Red : eToastGlowColor.Green,
                                   eToastPosition.MiddleCenter);
        }
    }
}
